package pattern.state.model;

public class FourthGear extends Gear {

	public FourthGear(Car car) {
		this.car = car;
	}
	
	@Override
	public void accelerate() throws Exception {
		car.setText("Faster? switch to 5 gear..");
		car.setState(car.getFifthGear());
		
	}

	@Override
	public void slowDown() throws Exception {
		car.setText("Slower? switch to 3 gear..");
		car.setState(car.getThirdGear());
		
	}

	@Override
	public void goBack() throws Exception {
		throw new IllegalStateException("Want to break the gearbox !?");
		
	}

	@Override
	public void stop() throws Exception {
		car.setText("Stop --- Neutral");
		car.setState(car.getNeutral());
		
	}

}
